import unittest


class Demo(unittest.TestCase):

    @classmethod
    def setUpClass(cls) -> None:
        print("初始化 setUpClass被执行\n")

    @classmethod
    def tearDownClass(cls) -> None:
        print("结束进程 tearDownClass被执行")

    def setUp(self) -> None:
        print("开始 setup被执行")

    def tearDown(self) -> None:
        print("结束 teardown被执行\n")

    def test_a(self):
        print("test_a被执行")

    def test_c(self):
        print("test_c被执行")

    def test_b(self):
        print("test_b被执行")
        a, b = 1, 2
        assert a + b == 3

    def d(self):
        print("d被执行")


if __name__ == '__main__':
    unittest.main()
